<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <title>会议详情</title>
    <style>

        .myTitle > input{
            float: right;
            margin-left: 15px;
        }

    </style>
</head>
<body>
<jsp:include page="/incloud/header.jsp" />

<div class="d-flex align-items-stretch">
    <!-- Sidebar Navigation-->
    <jsp:include page="/incloud/sidebar.jsp" />
    <!-- Sidebar Navigation end-->
    <div class="page-content">
        <div class="page-header">
            <div class="container-fluid">
                <h2 class="h5 no-margin-bottom">会议详情</h2>
            </div>
        </div>

        <section class="no-padding-bottom">

            <div class="myTitle">
                <h3 class="text-center">${meetingMap[0].title}</h3>
                <c:if test="${isComWithMe == 1}">
                    <input type="button" onclick="joinMeeting(${meetingMap[0].id},${isComWithMe})" value="取消会议" class="btn btn-danger">
                </c:if>
                <c:if test="${isComWithMe == 0}">
                    <input type="button" onclick="joinMeeting(${meetingMap[0].id},${isComWithMe})" value="参加会议" class="btn btn-info">
                </c:if>
            </div>

            <div class="myContent">
                <p class="h6"><strong>部门：</strong>${meetingMap[0].name}</p>
                <p class="h6"><strong>应到：</strong>${shoudComCount}<span>人</span></p>
                <p class="h6"><strong>实到：</strong>${reaComCount}<span>人</span></p>
                <p class="h6"><strong>未到：</strong>${unComCount}<span>人</span></p>
                <textarea style="padding: 2px" disabled="disabled" class="form-control" rows="11">${meetingMap[0].content}</textarea>


            </div>

            <div class="text-right myList">
                <p>开始时间：${meetingMap[0].start_time}</p>
                <p>日期：${meetingMap[0].publish_date}</p>
            </div>
        </section>

        <jsp:include page="/incloud/footer.jsp" />
    </div>
</div>


</body>
<script>
    function joinMeeting(cid,isCome){
        if(${canComWithMe == "flase"}){
            layer.msg("您无权参加该会议");
            return;
        }
        if(${meetingMap[0].status == 1}){
            layer.msg("会议正在进行中");
            return;
        }
        if(${meetingMap[0].status == 2}){
            layer.msg("会议已经结束");
            return;
        }
        location.href = "/meeting/comeMeeting?cid="+cid+"&isCome="+isCome;
    }
    $("#avatar").click(function () {
        location.href = "/user/detail?id=${loginUser.id}";
    })

</script>
</html>